import { Breadcrumb } from '@arco-design/web-react'
import React from 'react'
// import { Link, useLocation } from 'react-router-dom'
import { useSelector } from 'react-redux'

const BreadcrumbItem = Breadcrumb.Item

const App = () => {
  // const location = useLocation()
  // const paths = location.pathname.split('/').filter((path) => path) // 获取当前路径并分割
  // console.log('paths', location.pathname)
  // 拿到redux定义的初始状态
  const { count } = useSelector((state) => state.SetInitState)

  return (
    <div>
      {count}
      <Breadcrumb>
        <BreadcrumbItem>Home</BreadcrumbItem>
        <BreadcrumbItem href="#">Channel</BreadcrumbItem>
        <BreadcrumbItem>News</BreadcrumbItem>
      </Breadcrumb>
    </div>
  )
}

export default App
